package com.itheima.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class AOPAdvice {
    @Pointcut("execution(* *..*(..))")
    public void pt(){}


    @Before("pt()")
    public void before(){
        System.out.println("牛马在前面");
    }

    @After("pt()")
    public void after(){
        System.out.println("牛马在后面");
    }


}
